# vim:ts=4:sw=4:noet:
""" Method info bar """

import wx
from c.ui.wxw.platform import UITweaks
from c.ui.wxw.common import loadWxImage

class MethodBar(wx.Panel):
	def __init__(self, parent):
		wx.Panel.__init__(self, parent, -1)
		hbox = wx.BoxSizer(wx.HORIZONTAL)
		self.methLabel = wx.TextCtrl(self, -1, "")
		self.methLabel.SetForegroundColour(wx.Colour(0x20, 0x20, 0x20))
		self.methLabel.SetMinSize((200, UITweaks.methbarHeight))
		self.methLabel.SetBackgroundColour(wx.Colour(0xE8, 0xE8, 0xE8))
		self.methLabel.SetFont(wx.Font(
				11,
				wx.FONTFAMILY_SWISS,
				wx.FONTSTYLE_NORMAL,
				wx.FONTWEIGHT_BOLD))
		self.methLabel.SetEditable(False)
		hbox.Add(self.methLabel, 1, wx.ALL | wx.EXPAND, UITweaks.methpad)
		editSourceId = wx.NewId()
		editDocsId = wx.NewId()

		if wx.Platform=="__WXMAC__":
			self.SetBackgroundColour(wx.Colour(0xE8, 0xE8, 0xE8))
		self.SetSizer(hbox)

	def setMethodName(self, name):
		self.methLabel.SetValue(name)
